﻿#region Using Statements
using System;
using Microsoft.Xna.Framework;
#endregion

namespace DirectZZT.Shared.Screens
{
    /// <summary>
    /// Defines mechanisms to manage <see cref="IScreen"/>s.
    /// </summary>
    public interface IScreenManager : IGameComponent, IDisposable
    {
        /// <summary>
        /// Gets the game this screen manager is attached to.
        /// </summary>
        Microsoft.Xna.Framework.Game Game { get; }

        /// <summary>
        /// Returns a <see cref="Vector2"/> that contains the percentage of the location that is stated by <paramref name="x"/> and <paramref name="y"/>.
        /// </summary>
        /// <param name="x">A value from 0 to 100 containing the percentage of the abscissa (width/x) from the left.</param>
        /// <param name="y">A value from 0 to 100 containing the percentage of the ordinate (height/x) from the top.</param>
        /// <returns>A <see cref="Vector2"/> that contains the percentage of the location.</returns>
        /// <exception cref="System.ArgumentException"><paramref name="x"/> or <paramref name="y"/> had values less than 0 or greater than 100.</exception>
        Vector2 GetCoordinate(float x, float y);
        /// <summary>
        /// Returns a <see cref="Vector2"/> that contains the percentage of the size that is stated by <paramref name="width"/> and <paramref name="width"/>.
        /// </summary>
        /// <param name="width">A value from 0 to 100 containing the percentage of the width.</param>
        /// <param name="height">A value from 0 to 100 containing the percentage of the height.</param>
        /// <returns>A <see cref="Vector2"/> that contains the percentage of the size.</returns>
        /// <exception cref="System.ArgumentException"><paramref name="width"/> or <paramref name="height"/> had values less than 0 or greater than 100.</exception>
        Vector2 GetSize(float width, float height);
        /// <summary>
        /// Pushes the given screen to the list and immediately renders it.
        /// </summary>
        /// <param name="screen">The screen to add.</param>
        /// <param name="disposeCurrentScreen">Whether or not to dispose the current screen instead of keeping it in the stack.</param>
        void PushScreen(IScreen screen, bool disposeCurrentScreen);
        /// <summary>
        /// Updates the current active screen.
        /// </summary>
        /// <param name="gameTime">The time difference between this frame and the last frame.</param>
        void Update(GameTime gameTime);
        /// <summary>
        /// Renders the current active screen.
        /// </summary>
        /// <param name="gameTime"></param>
        void Draw(GameTime gameTime);
    }
}
